import requests

url = "http://192.168.10.131:1234/area"

# 查询所有区域信息
response = requests.get(url + "/listarea")

# 查询指定单个区域信息
response = requests.get(url + "/getareabyid?areaId=2")
response = requests.get(url + "/getareabyid", params={"areaId": 2})

# 新增一个区域信息
response = requests.post(url + "/addarea", data={"areaName": "夏安", "priority": "200"})

# 更新区域信息
response = requests.put(url + "/modifyarea",
                        json={"areaId": 2, "areaName": "重安", "priority":"100"})

# 删除一个区域信息
response = requests.delete(url + "/removearea", params={"areaId":5})

print("状态码: ", response.status_code)
print("响应结果:", response.json())
